package exceptions;

public class Test3 {
	public static void main(String args[]) throws MyException {
		m1();
	}

	public static void m1() {
		try {
			throw new StackOverflowError();
		} catch (StackOverflowError se) {
			System.out.println("Stackoverflow error occured ...");
			se.printStackTrace();
		}
	}
}

/*
 * You can throw as well as catch Error exception ,but these Error exception are
 * thrown by JVM under some abnormal cases . Ideally these errors can't be
 * recovered by user programs
 */